
/*
 * GET settings page.
 */
var config = require('../config')
	, restler = require('restler');

exports.settings = function(req, res){
	var getResp = function(url){
		// req.app
	  restler.get(url).on('complete', function(data){
	  	// res.send(data);
	  	res.render('index', { title: 'FM Roster Settings', employees: JSON.parse(data), fullURL: req.protocol + "://" + req.get('host')});
	  });
	};

	getResp(config.dataURL);
};